/**
 * Generate time : 2011-06-14 14:00:02
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cl.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCLItemAssociation
 * 
 */
public class ZMCLItemAssociation extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdSurveypointId = " "; /* 安全巡检点主键 */
	private String fdItemsId = " "; /* 安全检查项目主键 */
	private String fdIsImportant = " "; /* 是否重点检查项 */
	private String fdStatus = " "; /* 保存状态 */
	private String fdItemCode = " "; /* 检查项目编号 */
	private String fdItemContent = " "; /* 检查项目内容 */
	private Long fdFrequency = new Long(0); /* 检查频率 */
	private String fdFrequencyUnits = " "; /* 检查频率单位 */
	private String fdSecuritypathId = " "; /* 安全巡检路线主键 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSurveypointId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("安全巡检点主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdItemsId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("安全检查项目主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdIsImportant");
		eiColumn.setFieldLength(5);
		eiColumn.setDescName("是否重点检查项");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStatus");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("保存状态");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdItemCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("检查项目编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdItemContent");
		eiColumn.setFieldLength(200);
		eiColumn.setDescName("检查项目内容");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFrequency");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("检查频率");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFrequencyUnits");
		eiColumn.setFieldLength(5);
		eiColumn.setDescName("检查频率单位");
		eiMetadata.addMeta(eiColumn);
		
		eiColumn = new EiColumn("fdSecuritypathId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("安全巡检路线主键");
		eiMetadata.addMeta(eiColumn);
	}

	/**
	 * the constructor
	 */
	public ZMCLItemAssociation() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdSurveypointId - 安全巡检点主键
	 * 
	 * @return the fdSurveypointId
	 */
	public String getFdSurveypointId() {
		return this.fdSurveypointId;
	}

	/**
	 * set the fdSurveypointId - 安全巡检点主键
	 */
	public void setFdSurveypointId(String fdSurveypointId) {
		this.fdSurveypointId = fdSurveypointId;
	}

	/**
	 * get the fdItemsId - 安全检查项目主键
	 * 
	 * @return the fdItemsId
	 */
	public String getFdItemsId() {
		return this.fdItemsId;
	}

	/**
	 * set the fdItemsId - 安全检查项目主键
	 */
	public void setFdItemsId(String fdItemsId) {
		this.fdItemsId = fdItemsId;
	}

	/**
	 * get the fdIsImportant - 是否重点检查项
	 * 
	 * @return the fdIsImportant
	 */
	public String getFdIsImportant() {
		return this.fdIsImportant;
	}

	/**
	 * set the fdIsImportant - 是否重点检查项
	 */
	public void setFdIsImportant(String fdIsImportant) {
		this.fdIsImportant = fdIsImportant;
	}

	/**
	 * get the fdStatus - 保存状态
	 * 
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}

	/**
	 * set the fdStatus - 保存状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}

	/**
	 * @return the fdItemCode
	 */
	public String getFdItemCode() {
		return fdItemCode;
	}

	/**
	 * @param fdItemCode
	 *            the fdItemCode to set
	 */
	public void setFdItemCode(String fdItemCode) {
		this.fdItemCode = fdItemCode;
	}

	/**
	 * @return the fdItemContent
	 */
	public String getFdItemContent() {
		return fdItemContent;
	}

	/**
	 * @param fdItemContent
	 *            the fdItemContent to set
	 */
	public void setFdItemContent(String fdItemContent) {
		this.fdItemContent = fdItemContent;
	}

	/**
	 * @return the fdFrequency
	 */
	public Long getFdFrequency() {
		return fdFrequency;
	}

	/**
	 * @param fdFrequency
	 *            the fdFrequency to set
	 */
	public void setFdFrequency(Long fdFrequency) {
		this.fdFrequency = fdFrequency;
	}

	/**
	 * @return the fdFrequencyUnits
	 */
	public String getFdFrequencyUnits() {
		return fdFrequencyUnits;
	}

	/**
	 * @param fdFrequencyUnits
	 *            the fdFrequencyUnits to set
	 */
	public void setFdFrequencyUnits(String fdFrequencyUnits) {
		this.fdFrequencyUnits = fdFrequencyUnits;
	}
	
	/**
	 * get the fdSecuritypathId - 安全巡检路线主键
	 * 
	 * @return the fdSecuritypathId
	 */
	public String getFdSecuritypathId() {
		return this.fdSecuritypathId;
	}

	/**
	 * set the fdSecuritypathId - 安全巡检路线主键
	 */
	public void setFdSecuritypathId(String fdSecuritypathId) {
		this.fdSecuritypathId = fdSecuritypathId;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdSurveypointId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSurveypointId")), fdSurveypointId));
		setFdItemsId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdItemsId")), fdItemsId));
		setFdIsImportant(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdIsImportant")), fdIsImportant));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
		setFdItemCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdItemCode")), fdItemCode));
		setFdItemContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdItemContent")), fdItemContent));
		setFdFrequency(NumberUtils.toLong(StringUtils.toString(map.get("fdFrequency")), fdFrequency));
		setFdFrequencyUnits(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFrequencyUnits")), fdFrequencyUnits));
		setFdSecuritypathId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSecuritypathId")), fdSecuritypathId));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdSurveypointId", StringUtils.toString(fdSurveypointId, eiMetadata.getMeta("fdSurveypointId")));
		map.put("fdItemsId", StringUtils.toString(fdItemsId, eiMetadata.getMeta("fdItemsId")));
		map.put("fdIsImportant", StringUtils.toString(fdIsImportant, eiMetadata.getMeta("fdIsImportant")));
		map.put("fdStatus", StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));
		map.put("fdItemCode", StringUtils.toString(fdItemCode, eiMetadata.getMeta("fdItemCode")));
		map.put("fdItemContent", StringUtils.toString(fdItemContent, eiMetadata.getMeta("fdItemContent")));
		map.put("fdFrequency", StringUtils.toString(fdFrequency, eiMetadata.getMeta("fdFrequency")));
		map.put("fdFrequencyUnits", StringUtils.toString(fdFrequencyUnits, eiMetadata.getMeta("fdFrequencyUnits")));
		map.put("fdSecuritypathId", StringUtils.toString(fdSecuritypathId, eiMetadata.getMeta("fdSecuritypathId")));

		return map;

	}
}